﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bmz.Laboratory.Workflow.Context;
using Bmz.Laboratory.Workflow.Repository;
using Bmz.Laboratory.Workflow.Service;
using Bmz.Laboratory.Workflow.Service.Dto;

namespace Bmz.Laboratory.Workflow
{
    class Program
    {
        protected static void Main()
        {
            var repository = new EfRepository<FlowDbContext>();
            IFlowService flowService = new FlowService(repository);

            var userCode = "david.zhang";

            //flowService.NewFlow("leave", userCode);
            IEnumerable<TodoDto> list = flowService.GetTodoListByUser(userCode);
            foreach (var item in list)
            {
                flowService.TodoAction(item.NodeId, userCode);
            }
        }
    }
}
